# !/bin/bash
for ii in 0 1;
do
	python split_data.py
	#ratings_train_iuv.dat +  original features  => python => o+n o+new o+n+n (dict)
	for sys in original full;
	do
		if [ "$sys" = "original" ]; then
			component=1000
		elif [ "$sys" = "full" ]; then
			component=50
		fi
		#sys=original
		#component=1000
		python encoding_pca_nom.py $sys.csv type_$sys.csv $component
		./sim-cosine -u 3884 -i $component -r attr_pca_$component -t attr_pca_$component 1>attr_cos
		./sim-cosine  -u 3953 -i 6041  -r ratings_train_iuv.dat -t ratings_train_iuv.dat  1>beha_1st.cos
		python linear_merge.py attr_cos beha_1st.cos
		for i in 0 1;
		do 
			python complete_graph.py merged_net_$i.tmp simg.gph
			./socialfiltering -u 6041 -i 3953 -r ratings_train.dat -t target_users.dat -l ratings_test_input.dat -g simg.gph -k 5  -b 1 -a recwname 1>recaname
			#python evaluate.py recwname recaname $i >> result_$component
			python evaluate_test.py recwname recaname $i result_$component
		done
		echo >> result_$component
		#python print.py >> result_$component
	done
done
for cnt in 1000 50;
do
	#cnt=1000
	python mean_test.py result_$cnt
done